#include  <cstdio>
#include  <cstring>
#include  <stack>
using namespace std;

void add(char *t, char *f)
{
	int tl = strlen(t);
	int fl = strlen(f);
	stack<char> arr;

	int i,j,jinwei = 0;
	for( i = tl-1, j = fl-1; i!=-1 && j!=-1 ; --i, --j )
	{
		int temp = t[i] - '0' + f[j] - '0' + jinwei;
		if(temp > 9)
		{
			jinwei = 1;
			temp -= 10;
		}
		else
			jinwei = 0;

		arr.push(temp+'0');
	}
	if( i == -1 && j == -1 && jinwei == 1)
		arr.push('1');
	else if(j == -1) 
	{
		j = i;
		t = f;
	}

	while(i != -1)
	{
		int temp = t[i--] - '0' + jinwei;
		if(temp > 9)
		{
			jinwei = 1;
			temp -= 10;
		}
		else
			jinwei = 0;

		arr.push(temp+'0');
	}

	for( i = 0; !arr.empty() ; ++i )
	{
		t[i] = arr.top();
		arr.pop();
	}
	t[i] = '\0';
}


void mi(char *temp, int m, char *res)
{
	strcpy(res,temp);
	while( m > 0 )
	{
		printf("%d\n",m);
		add(res,res);
		if(m%2 == 1)
			add(res,temp);
		m/=2;
	}
}

int main(int argc, char *argv[])
{
	char s[7];
	int m;
	while( scanf("%s %d",s,&m) != EOF )
	{
		int left_o = 0, right_o = 0, point;

		for( int i = 0; s[i] == '0' ; ++i )
				left_o++;
		for( int i = 5; s[i] == '0' ; --i )
				right_o++;
		
		for( int i = 0 ; i < 6 ; ++i )
			if(s[i] == '.')
			{
				point = i;
				break;
			}
		
		char temp[7];
		int i = left_o, j = 0;
		while( i < 6 - right_o )
		{
			if( i == point )
			{
				i++;
				continue;
			}

			temp[j++] = s[i++]; 
		}
		temp[j] = '\0';

		char res[200];
		mi(temp,m,res);
		printf("%s\n",res);
	}
	//char a[10] = {'1','2','3','4','\0'};
	//add(a,a);
	//printf("%s\n",a);
}
